<?php 
	header("content-type:text/html;charset=utf-8");
	$id = $_POST['id'];
	$name = isset($_POST['name'])?$_POST['name']:"";
	$pwd = isset($_POST['pwd'])?$_POST['pwd']:"";
	$rpwd = isset($_POST['rpwd'])?$_POST['rpwd']:"";
	$shijian = isset($_POST['shijian'])?$_POST['shijian']:"";
	$dsn = "mysql:host=127.0.0.1;dbname=lianxi;charset=utf8";
	$pdo = new PDO($dsn,'root','root');
	$sql = "update `drzsgc` set name='$name',pwd='$pwd',rpwd='$rpwd',shijian='$shijian' where id = '$id'";
	$res = $pdo->exec($sql);
	if($res){
		echo "<script>alert('修改成功');location.href='select.php'</script>";
	}else{
		echo "<script>alert('修改失败');location.href='select.php'</script>";
	}
 ?>